package com.daijia.entity.score;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.daijia.entity.IdEntity;
import com.daijia.entity.account.Account;

public class Rate extends IdEntity {

	@Column(name = "from_account_id")
	private long fromAccountId;
	private long toAccountId;
	private String generalLevel;
	private String infoVerified;
	private String servingTime;
	private String waitingTime;
	private String serviceLevel;
	private String comments;
	
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "from_account_id", referencedColumnName = "id", unique = true)
	private Account fromAccount;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "to_account_id", referencedColumnName = "id", unique = true)
	private Account toAccount;
	public long getFromAccountId() {
		return fromAccountId;
	}
	public void setFromAccountId(long fromAccountId) {
		this.fromAccountId = fromAccountId;
	}
	public long getToAccountId() {
		return toAccountId;
	}
	public void setToAccountId(long toAccountId) {
		this.toAccountId = toAccountId;
	}
	public String getGeneralLevel() {
		return generalLevel;
	}
	public void setGeneralLevel(String generalLevel) {
		this.generalLevel = generalLevel;
	}
	public String getInfoVerified() {
		return infoVerified;
	}
	public void setInfoVerified(String infoVerified) {
		this.infoVerified = infoVerified;
	}
	public String getServingTime() {
		return servingTime;
	}
	public void setServingTime(String servingTime) {
		this.servingTime = servingTime;
	}
	public String getWaitingTime() {
		return waitingTime;
	}
	public void setWaitingTime(String waitingTime) {
		this.waitingTime = waitingTime;
	}
	public String getServiceLevel() {
		return serviceLevel;
	}
	public void setServiceLevel(String serviceLevel) {
		this.serviceLevel = serviceLevel;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public Account getFromAccount() {
		return fromAccount;
	}
	public void setFromAccount(Account fromAccount) {
		this.fromAccount = fromAccount;
	}
	public Account getToAccount() {
		return toAccount;
	}
	public void setToAccount(Account toAccount) {
		this.toAccount = toAccount;
	}
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
